﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using TwainLib;
using System.Collections;
using Rule;

namespace DocRecClient
{
    public partial class DocRecWindow : Form
    {
        private Twain twain;
        public DocRecWindow()
        {
            InitializeComponent();

            twain = new Twain();
            twain.Init(this.Handle);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int res = Program.fnDllInvokeTest(10);
            Debug.WriteLine(res.ToString());
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Program.fnDllInvokeRotaAndClip();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            twain.Select();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            twain.Acquire();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            twain.ShowAllDSInfo();
        }

        private void button6_Click(object sender, EventArgs e)
        {
            twain.GetDSCapabilities();
        }

        private void button7_Click(object sender, EventArgs e)
        {
            Program.fnDllInvokeStringTest("hello");
        }

        private void button8_Click(object sender, EventArgs e)
        {
            TitleImageTemplateRule target = new TitleImageTemplateRule();
            target.Threshold = 10.0f;
            target.Image = @"../bills/Template9.jpg";
            string fileName = @"../bills/Image5.jpg";
            bool expected = true;
            bool actual;
            actual = target.match(fileName);
        }
    }
}
